package com.augrain.microframework.lock.lock;

import com.augrain.microframework.lock.model.LockInfo;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;

/**
 * 重入锁
 *
 * @author biaoy
 * @since 2021/06/10
 */
public class ReentrantLock extends AbstractLock {
    public ReentrantLock(RedissonClient redissonClient, LockInfo info) {
        super(redissonClient, info);
    }

    @Override
    protected RLock getLock(LockInfo lockInfo) {
        return redissonClient.getLock(lockInfo.getName());
    }
}
